package mt.Junit;
import static org.junit.Assert.*;

import mt.Order;

import org.junit.Before;
import org.junit.Test;

public class JUnitOrderCreation {

	private Order or_buy;	
	private Order or_sell;	
	
	@Before
	public void setUp() {
		or_buy = Order.createBuyOrder("Joana", "Google", 50, 15);
		or_sell = Order.createSellOrder("Reinaldo", "Google", 25, 15);
	}

	@Test
	public void test() {
		assertEquals(or_buy.getNickname(),"Joana");
		assertEquals(or_buy.getStock(),"Google");
		assertEquals(or_buy.getNumberOfUnits(), 50);
		assertTrue(or_buy.isBuyOrder());
		assertFalse(or_buy.isSellOrder());
		assertEquals(or_sell.getNickname(),"Reinaldo");
		assertEquals(or_sell.getStock(),"Google");
		assertEquals(or_sell.getNumberOfUnits(), 25);
		assertFalse(or_sell.isBuyOrder());
		assertTrue(or_sell.isSellOrder());
	}
}
